﻿using Ec_System.Cache.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ec_System.Facade.Web
{
    public class SiteConfigFacade
    {
        SiteConfigCache siteConfigCache = new SiteConfigCache();
        /// <summary>
        /// 获取广告图片服务器地址
        /// </summary>
        public string AdCommendPicURL
        {
            get
            {
                return siteConfigCache.GetSiteConfigByKey("AdRecommendPicUrl");
            }
        }

        /// <summary>
        /// 获取图片服务器地址
        /// </summary>
        public string ImageServer
        {
            get
            {
                return siteConfigCache.GetSiteConfigByKey("ImageServer");
            }
        }

        /// <summary>
        /// 获取本网站的地址
        /// </summary>
        public string ThisSiteUrl
        {
            get
            {
                return siteConfigCache.GetSiteConfigByKey("SiteUrl");
            }
        }

        /// <summary>
        /// 服务承诺
        /// </summary>
        public string SiteServiceCommitment
        {
            get
            {
                return siteConfigCache.GetSiteConfigByKey("Site_Service_Commitment");
            }
        }
        /// <summary>
        /// 产品问答
        /// </summary>
        public string SiteQuestionAnswer
        {
            get
            {
                return siteConfigCache.GetSiteConfigByKey("Site_Question_Answer");
            }
        }

        /// <summary>
        /// 获取免运费标准
        /// </summary>
        public decimal ShipfreePrice
        {
            get
            {
                return decimal.Parse(siteConfigCache.GetSiteConfigByKey("Ship_free_Price"));
            }
        }

        /// <summary>
        /// 获取运费价钱
        /// </summary>
        public decimal ShipPrice
        {
            get
            {
                return decimal.Parse(siteConfigCache.GetSiteConfigByKey("Ship_Price"));
            }
        }

       
    }
}
